Skip to content

[systemd] disable default systemd udev rules for interfaces#7369

Merged
lguohan merged 2 commits intosonic-net:masterfrom
stepanblyschak:fix-systemd-default-link-rule
Apr 22, 2021
Merged

[systemd] disable default systemd udev rules for interfaces#7369
lguohan merged 2 commits intosonic-net:masterfrom
stepanblyschak:fix-systemd-default-link-rule

Conversation

@stepanblyschak
Copy link
Copy Markdown
Collaborator

@stepanblyschak stepanblyschak commented Apr 19, 2021

Why I did it

Fix #7364

99-default.link - was always in SONiC, but previous systemd (<247) had an issue and it did not work due to issue systemd/systemd#3374. Now systemd 247 works.

However, such policy overrides teamd provided mac address which causes teamd netdev to use a random mac
address. Therefore, needs to be disabled.

How I did it

Disable default systemd udev rules for interfaces.

How to verify it

Execute #7364 reproduction script.

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@stepanblyschak stepanblyschak requested a review from lguohan as a code owner April 19, 2021 18:32
@lguohan lguohan linked an issue Apr 21, 2021 that may be closed by this pull request
lguohan
lguohan previously approved these changes Apr 21, 2021
@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Apr 21, 2021

  1. I update PR 7369, @stepan Blyshchak, can you check if it is accurate?
  2. Other than teamd netdev, are you aware of any other netdev is affected?
  3. Instead of disable the 99-default.link, is it the same effect if we set the macpolicy=none?

@stepanblyschak
Copy link
Copy Markdown
Collaborator Author

  1. Thanks, it is accurate.
  2. I was focued on team devices, but this can happen to phy port netdevs and this was observed by our team
  3. Yes, according to what man pages say, although I find it safer to disable it completely to not have to worry about debian upsteam changes in 99-default.link. What do you think?

@lguohan
Copy link
Copy Markdown
Collaborator

lguohan commented Apr 21, 2021

since /etc/systemd/network override /usr/lib/systemd/network, i think it is better to provide our own policy explicitly. we can provide a file with mac address policy as none and copy to /etc/systemd/network, it would be better since in the future we may want to customize the other policy as well.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
@lguohan lguohan merged commit ae339c9 into sonic-net:master Apr 22, 2021
lguohan pushed a commit that referenced this pull request May 2, 2021
Fix #7364

99-default.link - was always in SONiC, but previous systemd (<247) had an issue and it did not work due to issue systemd/systemd#3374. Now systemd 247 works.

However, such policy overrides teamd provided mac address which causes teamd netdev to use a random mac
address. Therefore, needs to be disabled.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
raphaelt-nvidia pushed a commit to raphaelt-nvidia/sonic-buildimage that referenced this pull request May 23, 2021
…t#7369)

Fix sonic-net#7364

99-default.link - was always in SONiC, but previous systemd (<247) had an issue and it did not work due to issue systemd/systemd#3374. Now systemd 247 works.

However, such policy overrides teamd provided mac address which causes teamd netdev to use a random mac
address. Therefore, needs to be disabled.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
…t#7369)

Fix sonic-net#7364

99-default.link - was always in SONiC, but previous systemd (<247) had an issue and it did not work due to issue systemd/systemd#3374. Now systemd 247 works.

However, such policy overrides teamd provided mac address which causes teamd netdev to use a random mac
address. Therefore, needs to be disabled.

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interface MAC is overwritten

3 participants